/*
 * TMap Designer - A Thematic Map design software
 * Copyright (C) 2006 World Health Organization
 * http://www.who.int
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 */
package who.tmap.imp.dbase.impl;

import who.tmap.imp.dbase.DBaseHeader;


public class DBaseHeaderImpl implements DBaseHeader {

	private byte fileCode;
	
	private byte yearOfLastUpdate;
	private byte monthOfLastUpdate;
	private byte dayOfLastUpdate;
	
	private int nbRecords;
	private short headerLength;
	private short recordLength;
	
	private short reserved1213;
	private byte incompleteTransaction;
	private byte encryptionFlag;
	
	private int freeRecordThread;
	private double multiUser;
	
	private byte mdxFlag;
	private byte languageDriver;
	private short reserved3031;
	
	DBaseHeaderImpl() {
		
	}
	
	public byte getEncryptionFlag() {
		return encryptionFlag;
	}
	
	public void setEncryptionFlag(byte encryptionFlag) {
		this.encryptionFlag = encryptionFlag;
	}
	
	public byte getFileCode() {
		return fileCode;
	}
	
	public void setFileCode(byte fileCode) {
		this.fileCode = fileCode;
	}
	
	public int getFreeRecordThread() {
		return freeRecordThread;
	}
	
	public void setFreeRecordThread(int freeRecordThread) {
		this.freeRecordThread = freeRecordThread;
	}
	
	public short getHeaderLength() {
		return headerLength;
	}
	
	public void setHeaderLength(short headerLength) {
		this.headerLength = headerLength;
	}
	
	public byte getIncompleteTransaction() {
		return incompleteTransaction;
	}
	
	public void setIncompleteTransaction(byte incompleteTransaction) {
		this.incompleteTransaction = incompleteTransaction;
	}
	
	public byte getLanguageDriver() {
		return languageDriver;
	}
	
	public void setLanguageDriver(byte languageDriver) {
		this.languageDriver = languageDriver;
	}
	
	public byte getMdxFlag() {
		return mdxFlag;
	}
	
	public void setMdxFlag(byte mdxFlag) {
		this.mdxFlag = mdxFlag;
	}
	
	public double getMultiUser() {
		return multiUser;
	}
	
	public void setMultiUser(double multiUser) {
		this.multiUser = multiUser;
	}
	
	public int getNbRecords() {
		return nbRecords;
	}
	
	public void setNbRecords(int nbRecords) {
		this.nbRecords = nbRecords;
	}
	
	public short getRecordLength() {
		return recordLength;
	}
	
	public void setRecordLength(short recordLength) {
		this.recordLength = recordLength;
	}
	
	public short getReserved1213() {
		return reserved1213;
	}
	
	public void setReserved1213(short reserved1213) {
		this.reserved1213 = reserved1213;
	}
	
	public short getReserved3031() {	
		return reserved3031;
	}
	
	public void setReserved3031(short reserved3031) {
		this.reserved3031 = reserved3031;
	}

	public byte getDayOfLastUpdate() {
		return dayOfLastUpdate;
	}

	public void setDayOfLastUpdate(byte dayOfLastUpdate) {
		this.dayOfLastUpdate = dayOfLastUpdate;
	}

	public byte getMonthOfLastUpdate() {
		return monthOfLastUpdate;
	}

	public void setMonthOfLastUpdate(byte monthOfLastUpdate) {
		this.monthOfLastUpdate = monthOfLastUpdate;
	}

	/**
	 * Add 1900 to get a valid year
	 * @return
	 */
	public byte getYearOfLastUpdate() {
		return yearOfLastUpdate;
	}

	public void setYearOfLastUpdate(byte yearOfLastUpdate) {
		this.yearOfLastUpdate = yearOfLastUpdate;
	}
	
	
}
